/*
 * @Author: your name
 * @Date: 2022-03-07 09:41:52
 * @LastEditTime: 2022-03-07 09:42:40
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \trace-source-web\src\api\agr-safety-evaluation\evaluation-indicator\index.js
 */
/*
 * @Description: 评价指标管理
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 获取当前树状评价指标信息
   */
  gettreelist(params) {
    return zhreq.get(`/v3/evaluation/evaluationIndex/queryTreeList?organizationNo=${sessionStorage.organizationNo}`, params);
  },
  /**
   * @description: 新增当前树状评价指标信息
   * @evaluationIndexName 评价指标名称
   * @evaluationIndexScore 评价指标分数
   * @organizationNo 组织
   * @parentId 父节点
   * @remark 备注
   */
  addtreelist(params) {
    return zhreq.post("/v3/evaluation/evaluationIndex/add", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
   * @description: 修改当前树状评价指标信息
   * @evaluationIndexId 评价指标Id
   * @evaluationIndexName 评价指标名称
   * @evaluationIndexScore 评价指标分数
   * @organizationNo 组织
   * @parentId 父节点
   * @remark 备注
   */
  edittreelist(params) {
    return zhreq.post("/v3/evaluation/evaluationIndex/edit", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
  * @description: 删除当前树状评价指标信息
  * @evaluationIndexId evaluationIndexId
  */
  deltreelist(params) {
    return zhreq.post(`/v3/evaluation/evaluationIndex/delList`, {
      'evaluationIndexIdList': params
    });
  },
  /**
  * @description: 条件评价最上层
  * @evaluationIndexId evaluationIndexId
  */
  querybyconditlist(id) {
    return zhreq.post(`/v3/evaluation/evaluationIndex/queryByCondition`, {
      "parentId": id || 0,
      "organizationNo": sessionStorage.organizationNo
    });
  }
};

